Each object has an associated reference count — the number of active references to that object.
每一个对象都有一个关联的引用计数——对该对象的活跃引用的数量。
If an object's reference count is zero, it is garbage (unreachable from the user program) and can be recycled.
如果对象的引用计数是零,那么它就是垃圾(用户程序不可到达它),并可以回收。
A circular reference is formed when two objects reference each other, giving each object a reference count of 1.
当两个对象互相引用时,就构成了循环引用,其中每个对象的引用计数值都被赋1。
应用推荐